package com.rambo.sdh.sys.dao.inter.po;

import com.rambo.sdh.common.dao.inter.po.BasePO;

import javax.persistence.*;

/**
 * Create by Rambo on 2016/10/21
 **/
@Entity
@Table(name = "menu", schema = "db_test", catalog = "")
public class MenuPO extends BasePO {
    private String pid;
    private String name;
    private String href;
    private String mtype;
    private String ico;
    private String yxbz;
    private String sorts;
    private String uuid;

    @Basic
    @Column(name = "PID")
    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    @Basic
    @Column(name = "NAME")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "HREF")
    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }

    @Basic
    @Column(name = "MTYPE")
    public String getMtype() {
        return mtype;
    }

    public void setMtype(String mtype) {
        this.mtype = mtype;
    }

    @Basic
    @Column(name = "ICO")
    public String getIco() {
        return ico;
    }

    public void setIco(String ico) {
        this.ico = ico;
    }

    @Basic
    @Column(name = "YXBZ")
    public String getYxbz() {
        return yxbz;
    }

    public void setYxbz(String yxbz) {
        this.yxbz = yxbz;
    }

    @Basic
    @Column(name = "SORTS")
    public String getSorts() {
        return sorts;
    }

    public void setSorts(String sorts) {
        this.sorts = sorts;
    }

    @Id
    @Column(name = "UUID")
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        if (!super.equals(o))
            return false;

        MenuPO menuPO = (MenuPO) o;

        if (pid != null ? !pid.equals(menuPO.pid) : menuPO.pid != null)
            return false;
        if (name != null ? !name.equals(menuPO.name) : menuPO.name != null)
            return false;
        if (href != null ? !href.equals(menuPO.href) : menuPO.href != null)
            return false;
        if (mtype != null ? !mtype.equals(menuPO.mtype) : menuPO.mtype != null)
            return false;
        if (ico != null ? !ico.equals(menuPO.ico) : menuPO.ico != null)
            return false;
        if (yxbz != null ? !yxbz.equals(menuPO.yxbz) : menuPO.yxbz != null)
            return false;
        if (sorts != null ? !sorts.equals(menuPO.sorts) : menuPO.sorts != null)
            return false;
        if (uuid != null ? !uuid.equals(menuPO.uuid) : menuPO.uuid != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (uuid != null ? uuid.hashCode() : 0);
        result = 31 * result + (pid != null ? pid.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (href != null ? href.hashCode() : 0);
        result = 31 * result + (mtype != null ? mtype.hashCode() : 0);
        result = 31 * result + (ico != null ? ico.hashCode() : 0);
        result = 31 * result + (yxbz != null ? yxbz.hashCode() : 0);
        result = 31 * result + (sorts != null ? sorts.hashCode() : 0);
        return result;
    }
}